package com.sa.module.uif.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * 邮箱
 * @author huangxin
 *
 */
@MappedSuperclass
public class AbstractMailBox {

	private int id;
	private String name;	//发件人姓名
	private String origin;	//发件地址
	private String dest;	//收件地址
	private String content;		//内容
	private Timestamp sendTime;		//发送时间
	private Timestamp receiveTime;	//接收时间
	
	public AbstractMailBox(int id, String name, String origin, String dest,
			String content, Timestamp sendTime, Timestamp receiveTime) {
		super();
		this.id = id;
		this.name = name;
		this.origin = origin;
		this.dest = dest;
		this.content = content;
		this.sendTime = sendTime;
		this.receiveTime = receiveTime;
	}

	public AbstractMailBox() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	@Id 
	@GeneratedValue(strategy=IDENTITY)	    
	@Column(name="ID", unique=true, nullable=false)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="NAME", nullable=true, length=30)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name="ORIGIN", nullable=true, length=30)
	public String getOrigin() {
		return origin;
	}
	public void setOrigin(String origin) {
		this.origin = origin;
	}
	
	@Column(name="DEST", nullable=true, length=30)
	public String getDest() {
		return dest;
	}
	public void setDest(String dest) {
		this.dest = dest;
	}
	
	@Column(name="CONTENT", nullable=true, length=200)
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	@Column(name="SENDTIME", nullable=true)
	public Timestamp getSendTime() {
		return sendTime;
	}
	public void setSendTime(Timestamp sendTime) {
		this.sendTime = sendTime;
	}
	
	@Column(name="RECEIVETIME", nullable=true)
	public Timestamp getReceiveTime() {
		return receiveTime;
	}
	public void setReceiveTime(Timestamp receiveTime) {
		this.receiveTime = receiveTime;
	}

	@Override
	public String toString() {
		return "AbstractMailBox [id=" + id + ", name=" + name + ", origin="
				+ origin + ", dest=" + dest + ", content=" + content
				+ ", sendTime=" + sendTime + ", receiveTime=" + receiveTime
				+ "]";
	}
	
	

	
	
}
